#if !defined(TupleHeader)
#define TupleHeader

#include <string>
#include <vector>

#include "node.h"
#include "switcher.h"

class Tuple : public Node {
public:
  Tuple () :
    fixed (false) {
  }

  Tuple (int n) :
    nodes (n), fixed (false) {
  }

  static const NodeType ID = 11;

  NodeType type () const {
    return ID;
  }

  std::string toString (int, bool);

  std::string dump (int precedence) {
    return toString (precedence, false);
  }

  std::string display (int precedence) {
    return toString (precedence, true);
  }

  pNode replicate ();

  virtual bool doSwitch (Switcher &switcher) {
    return switcher.tuple (*this);
  }

  std::vector<pNode> nodes;
  bool fixed; // Would not be changed, i.e. constant; no need to replicate
};

#endif
